package lib;

import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Manager;

public class ThreeColumnField extends Manager 
{
	public static final int _width = 160;
	public ThreeColumnField()
	{
		this(0);
	}
	public ThreeColumnField(int style)
	{
		super(style);
	}
     protected void sublayout(int width, int height) 
     {
         setPositionChild(
             getField(0), 
             0, 
             0);
         layoutChild(
             getField(0), 
             getField(0).getPreferredWidth(), 
             getField(0).getPreferredHeight());

         setPositionChild(
             getField(1), 
             _width/2 - getField(1).getPreferredWidth()/2, 
             0);
         layoutChild(
             getField(1), 
             getField(1).getPreferredWidth(), 
             getField(1).getPreferredHeight());    

         setPositionChild(
             getField(2), 
             _width - getField(2).getPreferredWidth(), 
             0);
         layoutChild(
             getField(2), 
             getField(2).getPreferredWidth(), 
             getField(2).getPreferredHeight());    

         setExtent(width, height);
     }      

}
